#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int peakIndexInMountainArray(int* arr, int arrSize) {
	int n = arrSize;
	for (int i = 1; i < n - 1; i++)
	{
		if ((arr[i] > arr[i - 1]) && (arr[i] > arr[i + 1]))
			return i;
	}
	return 0;
}
int main()
{
	int arr[5] = { 1,2,3,2,1 };
	printf("%d", peakIndexInMountainArray(arr, 5));
	return 0;
}